We use the JavaScriptCore library to interact with WebView and JS, such as this code:
NSString *js = @"function add(a,b) {return a + b}";
[self.jsContent evaluateScript:js];
JSValue *jsValue = [self.jsContent[@"add"] callWithArguments:@[@2,@3]]; jsValue obtained here
Topic:
Safari & Web
SubTopic:
General
Tags: